package com.example.videowall;

import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.app.Activity;
import android.content.Intent;
import com.example.videowall.MainActivity;

public class DialogActivity extends Activity implements OnClickListener{
	Button button1;
	EditText signals_number;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.dialogue);
		button1 = (Button) findViewById(R.id.button1);
		signals_number = (EditText) findViewById(R.id.signals_number);
	    button1.setOnClickListener(this);
	}
	
	public void butCancel_Click(View v){
	    this.finish();
	}
	
	public void onClick(View v){
		
		Intent intent = new Intent();
		int number = Integer.parseInt(signals_number.getText().toString());
		intent.putExtra("signals_number", number); 
		setResult(RESULT_OK, intent);
		finish();
		
	}
	
	

}
